# -*- coding:utf-8 -*-

import pytest
import allure
import os

@pytest.fixture(autouse=True)
def login():
    print('登录')
    yield
    print('登录完成')

@allure.feature('用例1')
def test_1(login):
    print('test1')

@allure.feature('用例2')
def test_2():
    print('test2')
    
if __name__ == '__main__':
    pytest.main(['--alluredir','./test'])
    os.system('allure generate ./test -o ./report --clean')

